using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CollegeShop.Infrastructure.Entities.Repository;

namespace CollegeShop.Infrastructure.Entities.Entity
{
    public class Ontimeset : IAccessible<T_Ontimeset, Ontimeset>, ILogicEntity<T_Ontimeset, Ontimeset>
    {
        public int ID { get; set; }

        public string LevelName { get; set; }

        public decimal StartRate { get; set; }

        public decimal EndRate { get; set; }

        public decimal SalaryRate { get; set; }

        protected override void Covariant(T_Ontimeset model)
        {
            if (model != null)
            {
                    this.ID = model.ID;
                    this.LevelName = model.LevelName;
                    this.StartRate = model.StartRate;
                    this.EndRate = model.EndRate;
                    this.SalaryRate = model.SalaryRate;
            }
}
        protected override T_Ontimeset Inverter(Ontimeset model)
        {
            if (model != null)
            {
                return new T_Ontimeset()
                {
                    ID = model.ID,
                    LevelName = model.LevelName,
                    StartRate = model.StartRate,
                    EndRate = model.EndRate,
                    SalaryRate = model.SalaryRate,
                };
            }
            return null;
        }
        public Ontimeset Set(T_Ontimeset dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
